const app = getApp()
Component({
 properties: {
  // defaultData（父页面传递的数据-就是引用组件的页面）
  defaultData: {
   type: Object,
   value: {
    title: ""
   },
   observer: function(newVal, oldVal) {}
  }
 },
 data: {
  navBarHeight: app.globalData.navBarHeight,
  menuRight: app.globalData.menuRight,
  menuBotton: app.globalData.menuBotton,
  menuHeight: app.globalData.menuHeight,
 },
 attached: function() {},
 methods: {
  searchGoods:function(){
    if (!app.globalData.hasLogin) {
      wx.navigateTo({
        url: "/pages/auth/login/login"
      });
    }else{
      wx.navigateTo({
        url: "/pages/search/search"
      });
    }
  },
 }
})